<?php
/*
 * Created by generator
 *
 */

class EditLienActivitesAdherents extends Controller {

	function EditLienActivitesAdherents(){
		parent::Controller();
		$this->load->model('LienActivitesAdherents_model');
		$this->load->library('session');
		$this->load->helper('url');
	}


	/**
	 * Affichage des infos
	 */
	public function index($xaaidact){
		$model = LienActivitesAdherents_model::getLienActivitesAdherents($this->db, $xaaidact);
		$data['lienactivitesadherents'] = $model;

		$this->load->view('editlienactivitesadherents_view',$data);
	}

	/**
	 * Sauvegarde des modifications
	 */
	public function save(){
		// Mise a jour des donnees en base
		$model = new LienActivitesAdherents_model();
		$model->xaaidact = $this->input->post('xaaidact');
		
		$model->update($this->db);

		$this->session->set_flashdata('message', 'LienActivitesAdherents mis a jour');

		redirect('listlienactivitesadherentss/index'); 
	}
	
}
?>
